<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	template="/layout/page/form/page-fieldset-template.xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:sinox="http://www.sinosoft.com.cn/sinox"
	xmlns:p="http://primefaces.org/ui">

	<ui:param name="compId" value="#{commonContentViewBean.id}" />
	<ui:param name="compTitle" value="编辑流程包信息" />
	<ui:param name="compToggleable" value="false" />
	
	<ui:define name="compContent">
		<ui:decorate template="/layout/input/editable-template.xhtml">
			<!-- 第一行 -->
			<ui:decorate template="/layout/input/editable-2c-custom-template.xhtml">
				<ui:param name="compBean1Id" value="packageName" />
				<ui:param name="compBean1Lable" value="包名称" />
				<ui:param name="compBean1Required" value="true" />
				<ui:define name="compBean1Content">
					 <h:inputText id="#{compBean1Id}" styleClass="{required:true}" value="#{commonContentViewBean.fields.packageName}" />
				</ui:define>
				
				<ui:param name="compBean2Id" value="parentName" />
				<ui:param name="compBean2Lable" value="父包名称" />
				<ui:param name="compBean2Editable" value="false" />
				
				<ui:define name="compBean2Content">
					<h:outputText value="#{commonContentViewBean.fields.parentName}" />
				</ui:define>
			</ui:decorate>
			
			<!-- 第二行 -->
			<ui:decorate template="/layout/input/editable-2c-custom-template.xhtml">
				<ui:param name="compType" value="single" />
				
				<ui:param name="compBean1Id" value="packageDesc" />
				<ui:param name="compBean1Lable" value="包描述" />
				<ui:define name="compBean1Content">
					 <h:inputText id="#{compBean1Id}" styleClass="{maxlength:100}" value="#{commonContentViewBean.fields.packageDesc}" />
				</ui:define>
			</ui:decorate>
			
			<!-- 第三行 -->
			<ui:decorate template="/layout/input/editable-2c-custom-template.xhtml">
				<ui:param name="compBean1Id" value="packageIcon" />
				<ui:param name="compBean1Lable" value="对应图标" />
				
				<ui:define name="compBean1Content">
					<h:panelGrid columns="2" cellspacing="0" cellpadding="0" border="0">
						<h:selectOneMenu id="#{compBean1Id}" 
							onchange="#{compId}_changeIcon()"
							value="#{commonContentViewBean.fields.packageIcon}">
							<f:selectItems value="#{commonContentViewBean.packageIconItems}"/>
						</h:selectOneMenu>
						<h:graphicImage id="#{compBean1Id}Image" width="48" height="48" style="margin-left:10px;" url="img/#{commonContentViewBean.packageIconPath}" />
					</h:panelGrid>
					<p:remoteCommand name="#{compId}_changeIcon" update="#{compBean1Id}Image" />
				</ui:define>
				
				<ui:param name="compBean2Id" value="packageStatus" />
				<ui:param name="compBean2Lable" value="发布状态" />
				
				<ui:define name="compBean2Content">
					<sinox:selectOneMenu id="#{compBean2Id}" value="#{commonContentViewBean.fields.packageStatus}"
						items="#{commonContentViewBean.packageStatusItems}" />
				</ui:define>
			</ui:decorate>
			
			<!-- 第四行 -->
			<ui:decorate template="/layout/input/editable-2c-custom-template.xhtml">
				<ui:param name="compType" value="single" />
			
				<ui:param name="compBean1Id" value="packageDoc" />
				<ui:param name="compBean1Lable" value="帮助文档" />
				
				<ui:define name="compBean1Content">
					<h:inputText id="packageDoc" value="#{commonContentViewBean.fields.packageDoc}" />
				</ui:define>
			</ui:decorate>
			
			<!-- 第五行 -->
			<ui:decorate template="/layout/input/editable-2c-custom-template.xhtml">
				<ui:param name="compBean1Id" value="creator" />
				<ui:param name="compBean1Lable" value="创建者" />
				<ui:param name="compBean1Editable" value="false" />
				
				<ui:define name="compBean1Content">
					<h:outputText value="#{commonContentViewBean.fields.creator}" />
				</ui:define>
				
				<ui:param name="compBean2Id" value="createTime" />
				<ui:param name="compBean2Lable" value="创建时间" />
				<ui:param name="compBean2Editable" value="false" />
				
				<ui:define name="compBean2Content">
					<h:outputText value="#{commonContentViewBean.fields.createTimeStr}" />
				</ui:define>
			</ui:decorate>
			
			<!-- 第六行 -->
			<ui:decorate template="/layout/input/editable-2c-custom-template.xhtml">
				<ui:param name="compBean1Id" value="laseUpdator" />
				<ui:param name="compBean1Lable" value="最后更新者" />
				<ui:param name="compBean1Editable" value="false" />
				
				<ui:define name="compBean1Content">
					<h:outputText value="#{commonContentViewBean.fields.lastUpdator}" />
				</ui:define>
				
				<ui:param name="compBean2Id" value="laseUpdateTime" />
				<ui:param name="compBean2Lable" value="最后更新时间" />
				<ui:param name="compBean2Editable" value="false" />
				
				<ui:define name="compBean2Content">
					<h:outputText value="#{commonContentViewBean.fields.lastUpdateTimeStr}" />
				</ui:define>
			</ui:decorate>
		</ui:decorate>
		
		
	</ui:define>
	
	<ui:define name="compButtons">
		<ui:param name="parentViewBeanId" value="#{commonContentViewBean.parent.id}" />
		<p:commandButton title="保存" value="保存"
			onstart="return SinoPortal.Validation.validateForm('#{compId}_form');"
			actionListener="#{bpmAction.saveDirAction}"
			update="#{parentViewBeanId}_left_form,#{parentViewBeanId}_right_form"
			oncomplete="#{compId}_dialog.hide();">
			<h:inputHidden value="#{compId}" />
		</p:commandButton>
		<p:commandButton title="关闭" value="关闭" type="button"
			onclick="#{compId}_dialog.hide();" />
	</ui:define>

</ui:composition>